home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
FILER
/
SMART.ZIP
/
!SmartDir
/
c
/
ftask
< prev
next >
Wrap
Text File
|
1997-09-19
|
497b
|
25 lines
#include <string.h>
#include "OS:taskmanage.h"
#include "ftask.h"
os_error const *find_named_task(char const *name, wimp_t *result)
{
taskmanager_task block;
int context;
os_error const *e;
if (result) *result = 0;
for (context = 0; context >= 0; )
{
if (e = xtaskmanager_enumerate_tasks(context, &block, sizeof(block),
&context, 0), e)
return e;
if (!strcmp(block.name, name))
{
if (result) *result = block.task;
return 0;
}
}
return 0;
}